package com.cms.pms;

import java.util.Map;

/**
 * 调用记录对象，记录执行开始、结束时间
 * @author zhoushuang
 * 
 */
public interface Transaction {
	int SUCCESS = 0;
	int ERROR = 1;
	
	void setStatus(int s);
	
	void setStatus(int s, Exception e);
	
	int getStatus();
	
	long getStartTime();
	long getEndTime();
	
	long getDuration();
	
	Exception getException();
	
	void complete();
	String signature();
	
	Thread getThread();
	
	Map<String, String> getTags();
	
	void setTags(Map<String, String> tagsmap);
	
	void addTags(Map<String, String> tagsMap);
	
	void setTID(String tid);
	
	String getTID();
}
